//
//  TJUserPublishDataItem.m
//  BaoDian
//
//  Created by mac on 2024/7/27.
//

#import "TJUserPublishDataItem.h"

@implementation TJUserPublishDataItem

- (instancetype)initWithFrame:(CGRect)frame {
    if (self = [super initWithFrame:frame]) {
        
        UILabel *textLabel = [UILabel lableWithSuperView:self font:UIFontMake(13) color:UIColor.whiteColor title:nil textAlignment:NSTextAlignmentCenter];
        [textLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.centerX.offset(0);
            make.top.offset(10);
        }];
        
        UILabel *subTextLabel = [UILabel lableWithSuperView:self font:UIFontMake(10) color:UIColor.tj_8D9298Color title:nil textAlignment:NSTextAlignmentCenter];
        [subTextLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.centerX.offset(0);
            make.top.equalTo(textLabel.mas_bottom).offset(3);
        }];
        
        _textLabel = textLabel;
        _subTextLabel = subTextLabel;
    }
    return self;
}

- (void)setTextLabelTopMargin:(CGFloat)textLabelTopMargin {
    _textLabelTopMargin = textLabelTopMargin;
    
    [_textLabel mas_updateConstraints:^(MASConstraintMaker *make) {
        make.top.offset(textLabelTopMargin);
    }];
    
}
 
@end
